package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.hq.ims.data.entityenum.EnumChangeWay;
import com.hq.mybatis.base.BaseModel;
import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Builder;
import lombok.With;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;
import java.io.Serializable;
import com.hq.ims.data.vo.auth.BaseRowAuthVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.hq.ims.data.vo.BusiChangeMapstruct;

/**
* @author 蒋柏平
* @since 20241204
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Alias("BusiChange")
@TableName(value = "busi_change")
@ApiModel(value = "经营信息变更记录", description = "经营信息变更记录")
public class BusiChange extends BaseModel<BusiChange> implements Serializable {

    @ApiModelProperty(value = "变更id")
    @TableId(value = "busi_change_id",type = IdType.ASSIGN_UUID)
    private String busiChangeId;

    @ApiModelProperty(value = "经营信息id")
    @TableField(value = "busi_info_id")
    private String busiInfoId;

    @ApiModelProperty(value = "变更内容")
    @TableField(value = "change_content")
    private String changeContent;

    @ApiModelProperty(value = "变更前内容")
    @TableField(value = "change_before")
    private String changeBefore;

    @ApiModelProperty(value = "变更后内容")
    @TableField(value = "change_after")
    private String changeAfter;

    @ApiModelProperty(value = "变更方式")
    @TableField(value = "change_way")
    private EnumChangeWay changeWay;

    @ApiModelProperty(value = "变更时间")
    @TableField(value = "change_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime changeTime;

    public BusiChangeMapstruct.BusiChangeRowAuthVo auth(){
        BusiChangeMapstruct.BusiChangeRowAuthVo auth = new BusiChangeMapstruct.BusiChangeRowAuthVo(this);
        return auth;
    }

}
